/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jframedemo;
import javax.swing.*;
import java.awt.*;
/**
 *
 * @author shohdi-user
 */
public class JFrameDemo extends JFrame {

    public JFrameDemo ()
    {
        super("my first frame");
        setSize(400,400);
        setVisible(true);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
    
    public void paint (Graphics g)
    {
        super.paint(g);
        g.setColor(Color.white);
        g.fillRect(0,0, 400, 400);
        g.setColor(Color.orange);
        
        g.setFont(new Font("Tahoma",Font.BOLD,14));
        g.drawString("new frame by me", 60, 200);
        
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        
        new  JFrameDemo();
        
    }
}
